//
//  MPasswordView.m
//  KYProject
//
//  Created by Mxxx on 2016/12/22.
//  Copyright © 2016年 Roman. All rights reserved.
//

#import "MPasswordView.h"

@implementation MPasswordView

 - (void)awakeFromNib
{
    [super awakeFromNib];
    
    [self changetextFieldBorderStyleWith:self.NewPW];
}

//修改textField的边框
- (void)changetextFieldBorderStyleWith:(UITextField *)textField
{
    [textField setBorderStyle:UITextBorderStyleRoundedRect];
    textField.layer.cornerRadius = 5;
    textField.layer.borderColor = [UIColor lightGrayColor].CGColor;
    textField.clipsToBounds = YES;
    textField.layer.borderWidth = 1.0;
}

//点击确认
- (IBAction)clickBtn:(UIButton *)sender
{
    NSLog(@"点击了BTN");
    NSLog(@"CustomaryPW%@,NewPW%@,repeatPW%@",self.CustomaryPW.text,self.NewPW.text,self.repeatPW.text);
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    self.userInteractionEnabled = YES;
    [self.NewPW endEditing:YES];
    [self.CustomaryPW endEditing:YES];
    [self.repeatPW endEditing:YES];
}
@end
